import 'package:flutter_billi/http/core/HiNet.dart';
import 'package:flutter_billi/http/request/home_request.dart';
import 'package:flutter_billi/model/home_mo.dart';

class HomeDao {
  static get(String categoryName, {int pageIndex = 1, int pageSize = 10}) async {
    HomeRequest request = new HomeRequest();
    request.pathParams = categoryName;
    request.add('pageIndex', pageIndex).add("pageSize", pageSize);
    var result = await HiNet.getInstance().fire(request);
    // print("result:${result['data']}");
    // print(HomeMo.fromJson(result['data']));
    return HomeMo.fromJson(result['data']);
  }
}
